﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;

namespace HospitalTracking.Model
{
    [Serializable]
    public class Patient : ObservableObject
    {
        public const string FirstNamePropertyName = "FirstName";
        private string _FirstName = string.Empty;
        public string FirstName
        {
            get { return _FirstName; }
            set
            {
                if (_FirstName != value)
                {
                    _FirstName = value;
                    RaisePropertyChanged(FirstNamePropertyName);
                }
            }
        }

        public const string LastNamePropertyName = "LastName";
        private string _LastName = string.Empty;
        public string LastName
        {
            get { return _LastName; }
            set
            {
                if (_LastName != value)
                {
                    _LastName = value;
                    RaisePropertyChanged(LastNamePropertyName);
                }
            }
        }

        public const string IDPropertyName = "ID";
        private string _ID;
        public string ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    _ID = value;
                    RaisePropertyChanged(IDPropertyName);
                }
            }
        }

        public const string DateOfBirthPropertyName = "DateOfBirth";
        private DateTime _DateOfBirth;
        public DateTime DateOfBirth
        {
            get { return _DateOfBirth; }
            set
            {
                if (_DateOfBirth != value)
                {
                    _DateOfBirth = value;
                    RaisePropertyChanged(DateOfBirthPropertyName);
                }
            }
        }

        public const string PhoneNumberPropertyName = "PhoneNumber";
        private string _PhoneNumber;
        public string PhoneNumber
        {
            get { return _PhoneNumber; }
            set
            {
                if (_PhoneNumber != value)
                {
                    _PhoneNumber = value;
                    RaisePropertyChanged(PhoneNumberPropertyName);
                }
            }
        }

        public const string AddressPropertyName = "Address";
        private string _Address;
        public string Address
        {
            get { return _Address; }
            set
            {
                if (_Address != value)
                {
                    _Address = value;
                    RaisePropertyChanged(AddressPropertyName);
                }
            }
        }


        public const string DateOfEntrencePropertyName = "DateOfEntrence";
        private DateTime _DateOfEntrence;
        public DateTime DateOfEntrence
        {
            get { return _DateOfEntrence; }
            set
            {
                if (_DateOfEntrence != value)
                {
                    _DateOfEntrence = value;
                    RaisePropertyChanged(DateOfEntrencePropertyName);
                }
            }
        }

        public const string DateOfReleasePropertyName = "DateOfRelease";
        private DateTime _DateOfRelease;
        public DateTime DateOfRelease
        {
            get { return _DateOfRelease; }
            set
            {
                if (_DateOfRelease != value)
                {
                    _DateOfRelease = value;
                    RaisePropertyChanged(DateOfReleasePropertyName);
                }
            }
        }


        public const string DescriptionPropertyName = "Description";
        private string _Description;
        public string Description
        {
            get { return _Description; }
            set
            {
                if (_Description != value)
                {
                    _Description = value;
                    RaisePropertyChanged(DescriptionPropertyName);
                }
            }
        }


        public const string MedsPropertyName = "Meds";
        private ObservableCollection<string> _Meds;
        public ObservableCollection<string> Meds
        {
            get { return _Meds; }
            set
            {
                if (_Meds != value)
                {
                    _Meds = value;
                    RaisePropertyChanged(MedsPropertyName);
                }
            }
        }

        public const string TreatmentsPropertyName = "Treatments";
        private ObservableCollection<Treatment> _Treatments;
        public ObservableCollection<Treatment> Treatments
        {
            get { return _Treatments; }
            set
            {
                if (_Treatments != value)
                {
                    _Treatments = value;
                    RaisePropertyChanged(TreatmentsPropertyName);
                }
            }
        }

        public Patient(string FirstName, string LastName, string ID, DateTime DateOfBirth, string PhoneNumber, string Address, DateTime DateOfEntrence,
            DateTime DateOfRelease, string Description, ObservableCollection<string> Meds, ObservableCollection<Treatment> Treatments)
        {
            this.LastName = FirstName;
            this.LastName = LastName;
            this.ID = ID;
            this.DateOfBirth = DateOfBirth;
            this.PhoneNumber = PhoneNumber;
            this.Address = Address;
            this.DateOfEntrence = DateOfEntrence;
            this.DateOfRelease = DateOfRelease;
            this.Description = Description;
            this.Meds = Meds;
            this.Treatments = Treatments;
        }


    }
}
